package com.ecode.ecny.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.ecode.ecny.base.ReqHead;
import com.ecode.ecny.base.ReqBody;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * @ClassName BaseRspDTO
 * @Author mjlft
 * @Date 2021/8/12 21:17
 * @Version 1.0
 * @Description 请求使用
 */
@Data
public class BaseReqDTO<T extends ReqBody> {
    @Valid
    @NotNull(message = "请求头不能为空")
    @JSONField(name = "head")
    private ReqHead head;

    @Valid
    @NotNull(message = "请求体不能为空")
    @JSONField(name = "body")
    private T body;
}
